<!DOCTYPE html>
<!--
  ~ Copyright 2009-2015 by WWW.KNET.CN  All rights reserved.
  -->

<html>
<head>
    <title>Use cellStyle</title>
    <meta charset="utf-8">
    <link rel="stylesheet" href="../../bootstrap-table.css">
    <link rel="stylesheet" href="../../../bootstrap/2.3.1/css_cerulean/bootstrap.css">

    <script src="../../../jquery/jquery-1.9.1.min.js"></script>
    <script src="../../../bootstrap/2.3.1/js/bootstrap.min.js"></script>
    <script src="../../bootstrap-table.js"></script>
</head>
<body>
    <div class="container">
        <h1>Use cellStyle(<a href="https://github.com/wenzhixin/bootstrap-table/issues/221" target="_blank">#221</a>).</h1>
        <table id="table" class="table-striped"
               data-toggle="table" data-row-style="rowStyle"
               data-url="../json/data1.json">
            <thead>
            <tr data-row-style="rowStyle">
                <th data-field="id">ID</th>
                <th data-field="name" >Item Name</th>
                <th data-field="price">Item Price</th>
            </tr>
            </thead>
        </table>
    </div>
<script>
    function rowStyle(value, row, index) {
        return {
            striped: true,
            classes: "list"
            /*css: {
             "background-color": "red",
             }*/
        };
    } 
</script>
</body>
</html>
